<template>
  <div class="box">
    <table cellspacing="0">
      <thead>
      <tr>
        <th>序号</th>
        <th>服务单号</th>
        <th>服务内容</th>
        <th>当前状态</th>
      </tr>
      </thead>
      <tbody>
      <tr v-for="(item, key) in list" :key="key">
        <td>{{key + 1}}</td>
        <td>{{item['no']}}</td>
        <td>{{item['serviceContent']}}</td>
        <td>{{item['displayState']}}</td>
      </tr>
      </tbody>
    </table>
    <div v-show="list.length===0" class="tip">暂无数据</div>
  </div>
</template>

<script>
export default {
  name: 'ServiceSheet',
  data () {
    return {
      list: []
    }
  },
  methods: {
    init () {
      window.AppServiceSheetDwr.getSheetInfoByBuildGroupId(localStorage.buildGroupId, res => {
        if (res.length) {
          this.list = res
        }
      })
    }
  },
  created () {
    this.init()
  }
}
</script>

<style scoped>
</style>
